//go:build prod

package main

import (
	"github.com/micro-plat/hydra"
	"github.com/micro-plat/hydra/conf/server/auth/apikey"
	"github.com/micro-plat/hydra/conf/server/processor"
)

//bindConf 绑定启动配置， 启动时检查注册中心配置是否存在，不存在则引导用户输入配置参数并自动创建到注册中心
func init() {
	hydra.OnReady(func() {

		hydra.Conf.Vars().DB().Custom("db", "encrypt:cbc/pkcs5:0359e6dbb6f414c8f9561280089a23e97d3864eec5cd7efc4fc6948c5751c87b0f7bc22276e522414422e392f7e2f6f44653d3807965ea291b7dc84d0bcfe710b43efb7c2c816c2cff7f6ab5da65e839b14e2ffb541378246970fe0189018ee8e9ee21406234d713088e459d93be05927966828ae5b8c032cfdf15dc2fd08b9d7ea675e7b115286e647bf5dee00ceb5ec213b4d0ce1eb1e85804876ac8feb2328841a8feb6b37cbc")

		hydra.Conf.API("6689").
			Processor(processor.WithServicePrefix("/api")).
			APIKEY("ivk://api/check_sign", apikey.WithInvoker("ivk://api/check_sign"))

	})
}
